package com.lagou.service.impl;

import com.lagou.service.NewHelloService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@Service
public class HelloServiceImpl implements NewHelloService {

    @Override
    public String sayNewHello(String name, int timeToWait) {
        System.out.println(RpcContext.getContext().getAttachment("remoteHost"));
        return "hello,welcome to server2:"+name;
    }
}
